package bb.lanxing.model.json;

import android.os.Parcel;
import android.os.Parcelable;
import com.baidu.mapapi.model.LatLng;

public class BiciLatlng implements Parcelable {
    public static final Parcelable.Creator<BiciLatlng> CREATOR = new Parcelable.Creator<>() {
        @Override
        public BiciLatlng[] newArray(int size) {
            return new BiciLatlng[size];
        }

        @Override
        public BiciLatlng createFromParcel(Parcel in2) {
            return new BiciLatlng(in2);
        }
    };
    private String address;
    private String city;
    private String content;
    private String image;
    private boolean isCheckPoint = false;
    private double latitude;
    private double longitude;
    private String name;
    private String province;

    @Override
    public int describeContents() {
        return 0;
    }

    public String string() {
        return "lat = " + this.latitude + " , lon = " + this.longitude;
    }

    public LatLng getLatLng() {
        return new LatLng(this.latitude, this.longitude);
    }

    public double getLatitude() {
        return this.latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return this.longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return this.content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return this.city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getProvince() {
        return this.province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getImage() {
        return this.image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeDouble(this.latitude);
        dest.writeDouble(this.longitude);
        dest.writeString(this.name);
        dest.writeString(this.content);
        dest.writeString(this.image);
        dest.writeString(this.address);
        dest.writeString(this.city);
        dest.writeString(this.province);
    }

    public BiciLatlng(Parcel in2) {
        this.latitude = in2.readDouble();
        this.longitude = in2.readDouble();
        this.name = in2.readString();
        this.content = in2.readString();
        this.image = in2.readString();
        this.address = in2.readString();
        this.city = in2.readString();
        this.province = in2.readString();
    }

    public BiciLatlng() {
    }

    public BiciLatlng(double latitude, double longitude) {
        this.latitude = latitude;
        this.longitude = longitude;
    }

    public BiciLatlng(LatLng latLng) {
        this.latitude = latLng.latitude;
        this.longitude = latLng.longitude;
    }

    public boolean isCheckPoint() {
        return this.isCheckPoint;
    }

    public void setIsCheckPoint(boolean isCheckPoint) {
        this.isCheckPoint = isCheckPoint;
    }
}
